package com.itheima_02;

public class ArgsDemo01 {
    public static void main(String[] args) {
        int number = 100;
        System.out.println(number); // 100
        change(number);
        System.out.println(number); // 100

        int[] arr = {10, 20, 30};
        System.out.println(arr[1]); // 20
        change(arr);
        System.out.println(arr[1]); // 200
    }

    public static void change(int number) {
        number = 200;
    }

    public static void change(int[] arr) {
        arr[1] = 200;
    }
}

/**
 * 方法参数传递
 * 基本类型：值传递
 * 引用类型：引用传递
 */
